Skip to content

Support multi-viewport on Wayland via xdg-toplevel-drag #8609

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
azonenberg opened this issue May 1, 2025 · 1 comment
Open

Support multi-viewport on Wayland via xdg-toplevel-drag #8609

azonenberg opened this issue May 1, 2025 · 1 comment

Comments

@azonenberg
Copy link
Contributor

azonenberg commented May 1, 2025

Version/Branch of Dear ImGui:

latest docking

Back-ends:

any

Compiler, OS:

Linux

Full config/build information:

No response

Details:

Multi-viewport is currently not supported on Wayland (#8587 and others).

It appears that the new xdg-toplevel-drag protocol https://wayland.app/protocols/xdg-toplevel-drag-v1 is designed to enable exactly this sort of use case. Some new backend code would be needed to reflect the fact that we need to rely on drag/drop evens and can't use global coordinates to determine which window is being dragged where. But I disagree with previous statements that multi-viewport is impossible to implement on Wayland. This may have been true prior to the creation of xdg-toplevel-drag but if Firefox/Chrome can drag tabs into new windows and back, so can we.

Note that this will only be possible if the user is using a compositor implementing this protocol (e.g. KWin) so we will still need a check to disable multi-viewport if xdg-toplevel-drag is not available.

Screenshots/Video:

No response

Minimal, Complete and Verifiable Example code:

No response

@tokyovigilante
Copy link

tokyovigilante commented May 8, 2025

Hi All,

I'm working on a native Wayland backend for imgui (my project requires features SDL doesn't support), and I'd be interested in working on this.

Image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants